package cn.tedu.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

public class Cart implements Serializable {
    private static final long serialVersionUID = -7706102609675176368L;

    private Integer id;
    private Integer uid;
    private Integer goodsId;
    private String goodsImage;
    private String goodsTitle;
    private String goodsItemType;
    private Integer goodsPrice;
    private Integer goodsCount;
    private String createdUser;
    private Date createdTime;
    private String modifiedUser;
    private Date modifiedTime;

    public Cart(Integer id, Integer uid, Integer goodsId, String goodsImage, String goodsTitle, String goodsItemType, Integer goodsPrice, Integer goodsCount, String createdUser, Date createdTime, String modifiedUser, Date modifiedTime) {
        this.id = id;
        this.uid = uid;
        this.goodsId = goodsId;
        this.goodsImage = goodsImage;
        this.goodsTitle = goodsTitle;
        this.goodsItemType = goodsItemType;
        this.goodsPrice = goodsPrice;
        this.goodsCount = goodsCount;
        this.createdUser = createdUser;
        this.createdTime = createdTime;
        this.modifiedUser = modifiedUser;
        this.modifiedTime = modifiedTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Cart cart = (Cart) o;
        return Objects.equals(id, cart.id) &&
                Objects.equals(uid, cart.uid) &&
                Objects.equals(goodsId, cart.goodsId) &&
                Objects.equals(goodsImage, cart.goodsImage) &&
                Objects.equals(goodsTitle, cart.goodsTitle) &&
                Objects.equals(goodsItemType, cart.goodsItemType) &&
                Objects.equals(goodsPrice, cart.goodsPrice) &&
                Objects.equals(goodsCount, cart.goodsCount) &&
                Objects.equals(createdUser, cart.createdUser) &&
                Objects.equals(createdTime, cart.createdTime) &&
                Objects.equals(modifiedUser, cart.modifiedUser) &&
                Objects.equals(modifiedTime, cart.modifiedTime);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, uid, goodsId, goodsImage, goodsTitle, goodsItemType, goodsPrice, goodsCount, createdUser, createdTime, modifiedUser, modifiedTime);
    }

    @Override
    public String toString() {
        return "Cart{" +
                "id=" + id +
                ", uid=" + uid +
                ", goodsId=" + goodsId +
                ", goodsImage='" + goodsImage + '\'' +
                ", goodsTitle='" + goodsTitle + '\'' +
                ", goodsItemType='" + goodsItemType + '\'' +
                ", goodsPrice=" + goodsPrice +
                ", goodsCount=" + goodsCount +
                ", createdUser='" + createdUser + '\'' +
                ", createdTime=" + createdTime +
                ", modifiedUser='" + modifiedUser + '\'' +
                ", modifiedTime=" + modifiedTime +
                '}';
    }

    public Cart() {
        super();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public String getGoodsImage() {
        return goodsImage;
    }

    public void setGoodsImage(String goodsImage) {
        this.goodsImage = goodsImage == null ? null : goodsImage.trim();
    }

    public String getGoodsTitle() {
        return goodsTitle;
    }

    public void setGoodsTitle(String goodsTitle) {
        this.goodsTitle = goodsTitle == null ? null : goodsTitle.trim();
    }

    public String getGoodsItemType() {
        return goodsItemType;
    }

    public void setGoodsItemType(String goodsItemType) {
        this.goodsItemType = goodsItemType == null ? null : goodsItemType.trim();
    }

    public Integer getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(Integer goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public Integer getGoodsCount() {
        return goodsCount;
    }

    public void setGoodsCount(Integer goodsCount) {
        this.goodsCount = goodsCount;
    }

    public String getCreatedUser() {
        return createdUser;
    }

    public void setCreatedUser(String createdUser) {
        this.createdUser = createdUser == null ? null : createdUser.trim();
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public String getModifiedUser() {
        return modifiedUser;
    }

    public void setModifiedUser(String modifiedUser) {
        this.modifiedUser = modifiedUser == null ? null : modifiedUser.trim();
    }

    public Date getModifiedTime() {
        return modifiedTime;
    }

    public void setModifiedTime(Date modifiedTime) {
        this.modifiedTime = modifiedTime;
    }
}